<!--
 * @Author: Zhang Yingying
 * @Date: 2020-11-16 16:43:42
 * @LastEditors: Zhang Yingying
 * @LastEditTime: 2020-12-14 22:07:26
-->
<script>
/*
 * @Author: Zhang Yingying
 * @Date: 2020-10-24 17:37:30
 * @LastEditors: Zhang Yingying
 * @LastEditTime: 2020-11-07 13:20:04
 */
/*eslint-disable*/
import Vue from "vue";
import Component from "vue-class-component";
import BaseControl from "./base-control.vue";

@Component({
  name: "SwitchControl"
})
export default class SwitchControl extends BaseControl {
  render(h) {
    var { style, ...rest } = this.$attrs;
    return (
      <el-switch
        {...{
          props: {
            ...rest,
            value: this.value
          },
          attrs: {
            ...rest
          },
          on: {
            ...this.$listeners,
            input: val => {
              this.$emit("input", val);
            }
          }
        }}
      ></el-switch>
    );
  }
}
</script>
